Error reporting in Parsing Expression Grammars
نویسندگان
چکیده
منابع مشابه
Error Reporting in Parsing Expression Grammars
Parsing Expression Grammars (PEGs) describe top-down parsers. Unfortunately, the errorreporting techniques used in conventional top-down parsers do not directly apply to parsers based on Parsing Expression Grammars (PEGs), so they have to be somehow simulated. While the PEG formalism has no account of semantic actions, actual PEG implementations add them, and we show how to simulate an error-re...
متن کاملException Handling for Error Reporting in Parsing Expression Grammars
Parsing Expression Grammars (PEGs) are a new formalism to describe a top-down parser of a language. However, error handling techniques that are often applied to top-down parsers are not directly applicable to PEGs. This problem is usually solved in PEGs using a heuristic that helps to simulate the error reporting technique from topdown parsers, but the error messages are generic. We propose the...
متن کاملLinear Parsing Expression Grammars
PEGs were formalized by Ford in 2004, and have several pragmatic operators (such as ordered choice and unlimited lookahead) for better expressing modern programming language syntax. Since these operators are not explicitly defined in the classic formal language theory, it is significant and still challenging to argue PEGs’ expressiveness in the context of formal language theory. Since PEGs are ...
متن کاملDerivatives of Parsing Expression Grammars
This paper introduces a new memoized derivative parsing algorithm for recognition of parsing expression grammars. The algorithm runs in worst case quartic time and cubic space. However, existing research suggests that due to the limited amount of backtracking and recursion in realworld grammars and input, practical performance may be closer to linear time and constant space; experimental valida...
متن کاملLeft Recursion in Parsing Expression Grammars
Parsing Expression Grammars (PEGs) are a formalism that can describe all deterministic context-free languages through a set of rules that specify a top-down parser for some language. PEGs are easy to use, and there are efficient implementations of PEG libraries in several programming languages. A frequently missed feature of PEGs is left recursion, which is commonly used in Context-Free Grammar...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Science of Computer Programming
سال: 2016
ISSN: 0167-6423
DOI: 10.1016/j.scico.2016.08.004